package com.example.demo03_mvm.repos;

import androidx.lifecycle.MutableLiveData;

import com.example.demo03_mvm.model.AddCartEntity;
import com.example.demo03_mvm.model.BaseModel;
import com.example.demo03_mvm.model.CartEntity;

import okhttp3.RequestBody;

public class CartRepso extends BaseModel {

    public MutableLiveData<AddCartEntity> addCart(RequestBody body){
        return getData(getApi().addCart(body),new MutableLiveData<>());
    }

    public MutableLiveData<CartEntity> getCarts(){
        return getData(getApi().getCarts(),new MutableLiveData<>());
    }


    public MutableLiveData<AddCartEntity> deleteCart(RequestBody body){
        return getData(getApi().deleteCart(body),new MutableLiveData<>());
    }

}
